package com.example.spring;

import com.example.spring.jdbc.MyDateSource1;
import com.example.spring.jdbc.MyDateSource2;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName:testJDBC
 * Package:com.example.spring
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/8-17:06
 * @Version:v1.0
 */
public class testJDBC {
    @Test
    public void name() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-util.xml");
        MyDateSource1 ds1 = applicationContext.getBean("ds1", MyDateSource1.class);
        MyDateSource2 ds2 = applicationContext.getBean("ds2", MyDateSource2.class);
        System.out.println(ds1);
        System.out.println(ds2);
    }
}
